package com.hcc.gateway.netty.context;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.Map;

/**
 * DefaultGatewayExchange
 *
 * @author hushengjun
 * @date 2021/12/26
 */
@Data
@AllArgsConstructor
public class DefaultGatewayExchange implements GatewayExchange {

    private ReqContext reqContext;
    private RespContext respContext;
    private Map<String, Object> attributes;

    public DefaultGatewayExchange(ReqContext reqContext, RespContext respContext) {
        this.reqContext = reqContext;
        this.respContext = respContext;
    }

    @Override
    public ReqContext getReqContext() {
        return reqContext;
    }

    @Override
    public RespContext getRespContext() {
        return respContext;
    }

    @Override
    public Map<String, Object> getAttributes() {
        return attributes;
    }

}
